﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Print_UI
{
    public partial class FrmClassOfStudent : CommonForm
    {
        public FrmClassOfStudent()
        {
            InitializeComponent();
        }
        public int iStudentID;
        private void FrmClassOfStudent_Load(object sender, EventArgs e)
        {

            var query = from obj in Model.PRI_StudentInSemester.Where(c => c.StudentID == iStudentID)
                        select new { obj.PRI_Student.Firstname, obj.PRI_Student.Code, obj.PRI_Student.Lastname, obj.CAT_Class.Name, YearName = obj.CAT_Year.Name, obj.SemesterID, obj.SchoolFee };
            lblStudentCode.Text = query.FirstOrDefault().Code;
            lblStudentFullname.Text = query.FirstOrDefault().Firstname + " " + query.FirstOrDefault().Lastname;
            gvdata.DataSource = query;
            gridColumn8.DisplayFormat.FormatString = "{0:#,###.##}";
            gridColumn8.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom;
        }

        
    }
}
